package com.jiangxiaofei.citycloud.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiangxiaofei.citycloud.R;
import com.jiangxiaofei.citycloud.bean.FleaMenuBean;

import java.util.List;

/**
 * @author: JiangXFei
 * @date: 2017/11/9 0009
 * @content:首页菜单适配器
 */

public class FleaMenuRecyAdapter extends BaseQuickAdapter<FleaMenuBean, BaseViewHolder> {


    public FleaMenuRecyAdapter(int layoutResId, @Nullable List<FleaMenuBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FleaMenuBean item) {
        ImageView imageView = helper.getView(R.id.img_menu);
        Glide.with(mContext).load(item.getImg()).into(imageView);
        helper.setText(R.id.tv_menu, item.getName());
    }

}
